#pragma once
//#include "diplom.h"
#include "tools\DGraphicObject.h"

class DPin: public DGraphicObject
{
	wxPoint m_pos;
	int m_pinLenght;

public:
	enum PIN_DIRECTION
	{
		PINDIR_NONE,
		PINDIR_RIGHT,
		PINDIR_LEFT,
		PINDIR_UP,
		PINDIR_DOWN
	};

	DPin(void);
	DPin(wxPoint pos, PIN_DIRECTION pdir, int pinLen);
	~DPin(void);

	void Draw(wxDC *dc);
	bool PointInside(wxPoint *pnt);
	float GetArea();
	void ConvertToText(wxString *str);
	wxPoint GetTopLeft(void);
	wxPoint GetPosition() { return m_pos; }
	wxPoint GetBottomRight();

private:
	PIN_DIRECTION m_pinDir;

};

